package com.estar.assistsurvy.thread;

import com.estar.assistsurvy.constant.Constants;
import com.estar.assistsurvy.entity.RequestWalletChange;
import com.estar.assistsurvy.entity.ResponseChangeDetail;

import android.content.Context;
import android.os.Handler;
import android.util.Log;

public class WalletDetailThread extends BaseThread {

	private RequestWalletChange walletDetail;

	public WalletDetailThread(Context context, Handler handler, RequestWalletChange walletDetail) {
		super(context, handler);
		this.walletDetail = walletDetail;
	}
	
	@Override
	public void run() {
		// TODO Auto-generated method stub
		url_str=Constants.NAMESPACE+Constants.WALLETDETAIL;
		json=gson.toJson(walletDetail);
		postRequest(url_str, json);
		if(result!=null){
			Log.i("wl", "请求钱包明细返回值"+result);
			ResponseChangeDetail changeDetail=new ResponseChangeDetail();
			changeDetail=gson.fromJson(result, ResponseChangeDetail.class);
			msg.what=0;
			msg.obj=changeDetail;
			msg.sendToTarget();
		}
	}
}
